﻿using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.IO;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.DB;
using StairsModuleAndEdit.StairsModel.CommonUnit;
using StairsModuleAndEdit.StairsModel.DataInfos;

namespace StairsModuleAndEdit.StairsModel.Kit
{
	public class TrigonStairsKit : ProjectionDrawingKit
	{
		public TrigonStairsKit(Application app) : base(app)
		{
		}

		public bool TrigonStairsProfileCurves(ref TrigonStairs stairs, bool bDrawNoteInfo, int basePointIndex, bool lrMirror, bool tbMirror, bool bClockwiseUp, double rotateAngle, bool bBottom, bool bMid, bool bLand, bool bTop)
		{
			LineRunData bottomRunData = stairs.m_BottomRunData;
			LineRunData midRunData = stairs.m_MidRunData;
			LineRunData topRunData = stairs.m_TopRunData;
			double dWellWidth = stairs.m_dWellWidth;
			double width = stairs.m_LandData.Width;
			double num = bottomRunData.RunLength + 2.0 * stairs.m_LandData.Width;
			double bundingBoxHeight = num;
			List<XYZ> list = new List<XYZ>();
			XYZ zero = XYZ.Zero;
			XYZ xyz = new XYZ(bottomRunData.RunWidth, 0.0, 0.0);
			XYZ xyz2 = new XYZ(0.0, bottomRunData.RunLength, 0.0);
			XYZ xyz3 = new XYZ(bottomRunData.RunWidth, bottomRunData.RunLength, 0.0);
			XYZ pt = new XYZ(dWellWidth, 0.0, 0.0);
			XYZ pt2 = new XYZ(midRunData.RunWidth, 0.0, 0.0);
			XYZ pt3 = new XYZ(midRunData.RunLength, 0.0, 0.0);
			double num2 = 0.52359877559829882;
			XYZ xyz4 = Geometry.RotateTo(pt, num2, XYZ.BasisZ);
			XYZ xyz5 = Geometry.RotateTo(pt2, 2.0 * num2, XYZ.BasisZ);
			XYZ xyz6 = Geometry.RotateTo(pt3, -num2, XYZ.BasisZ);
			XYZ xyz7 = xyz3 + xyz4;
			XYZ xyz8 = xyz7 + xyz5;
			XYZ xyz9 = xyz8 + xyz6;
			XYZ xyz10 = xyz7 + xyz6;
			XYZ xyz11 = Geometry.RotateTo(pt, -3.0 * num2, XYZ.BasisZ);
			XYZ xyz12 = Geometry.RotateTo(pt2, -2.0 * num2, XYZ.BasisZ);
			XYZ xyz13 = Geometry.RotateTo(pt3, -5.0 * num2, XYZ.BasisZ);
			XYZ xyz14 = xyz10 + xyz11;
			XYZ xyz15 = xyz14 + xyz12;
			XYZ xyz16 = xyz15 + xyz13;
			XYZ xyz17 = xyz14 + xyz13;
			stairs.m_BottomRunData.PtRunBottomLeft = zero;
			stairs.m_BottomRunData.PtRunBottomRight = xyz;
			stairs.m_BottomRunData.PtRunTopLeft = xyz2;
			stairs.m_BottomRunData.PtRunTopRight = xyz3;
			stairs.m_MidRunData.PtRunBottomLeft = xyz8;
			stairs.m_MidRunData.PtRunBottomRight = xyz7;
			stairs.m_MidRunData.PtRunTopLeft = xyz9;
			stairs.m_MidRunData.PtRunTopRight = xyz10;
			stairs.m_TopRunData.PtRunBottomLeft = xyz15;
			stairs.m_TopRunData.PtRunBottomRight = xyz14;
			stairs.m_TopRunData.PtRunTopLeft = xyz16;
			stairs.m_TopRunData.PtRunTopRight = xyz17;
			XYZ xyz18 = new XYZ(0.0, width, 0.0);
			XYZ xyz19 = xyz2 + xyz18;
			XYZ xyz20 = -xyz6.Normalize();
			xyz20 = xyz20.Multiply(width);
			XYZ xyz21 = xyz8 + xyz20;
			XYZ xyz22 = -xyz20;
			XYZ xyz23 = xyz9 + xyz22;
			XYZ xyz24 = -xyz13.Normalize();
			xyz24 = xyz24.Multiply(width);
			XYZ xyz25 = xyz15 + xyz24;
			XYZ xyz26 = -xyz24;
			XYZ xyz27 = xyz16 + xyz26;
			XYZ xyz28 = -xyz18;
			XYZ xyz29 = zero + xyz28;
			stairs.m_listPointsSupport.Add(zero);
			stairs.m_listPointsSupport.Add(xyz2);
			stairs.m_listPointsSupport.Add(xyz19);
			stairs.m_listPointsSupport.Add(xyz21);
			stairs.m_listPointsSupport.Add(xyz8);
			stairs.m_listPointsSupport.Add(xyz9);
			stairs.m_listPointsSupport.Add(xyz23);
			stairs.m_listPointsSupport.Add(xyz25);
			stairs.m_listPointsSupport.Add(xyz15);
			stairs.m_listPointsSupport.Add(xyz16);
			stairs.m_listPointsSupport.Add(xyz27);
			stairs.m_listPointsSupport.Add(xyz29);
			list.Add(xyz19);
			list.Add(xyz21);
			list.Add(xyz23);
			list.Add(xyz25);
			XYZ xyz30 = list[basePointIndex];
			base.CalulateTransform(lrMirror, tbMirror, rotateAngle, num, bundingBoxHeight, xyz30);
			stairs.m_TransVector = Geometry.TransformPoint(xyz30, this.m_Transform);
			stairs.m_listOtherCurve.AddRange(base.DrawBasePoint(xyz30, 100.0));
			stairs.m_Transform = this.m_Transform;
			if (bDrawNoteInfo)
			{
				XYZ xyz31 = (zero + xyz) / 2.0 - XYZ.BasisY * 1.3;
				XYZ xyz32 = (xyz16 + xyz17) / 2.0 - XYZ.BasisX * 1.3;
				xyz31 = Geometry.TransformPoint(xyz31, this.m_Transform);
				xyz32 = Geometry.TransformPoint(xyz32, this.m_Transform);
				if (bClockwiseUp)
				{
					string text = "上";
					TextNoteInfo item = new TextNoteInfo(text, PenColor.PC_Black, (double)text.Length, xyz31, (double)text.Length, (double)text.Length * 1.5);
					stairs.m_listText.Add(item);
					text = "下";
					TextNoteInfo item2 = new TextNoteInfo(text, PenColor.PC_Black, (double)text.Length, xyz32, (double)text.Length, (double)text.Length * 1.5);
					stairs.m_listText.Add(item2);
				}
				else
				{
					string text2 = "上";
					TextNoteInfo item3 = new TextNoteInfo(text2, PenColor.PC_Black, (double)text2.Length, xyz32, (double)text2.Length, (double)text2.Length * 1.5);
					stairs.m_listText.Add(item3);
					text2 = "下";
					TextNoteInfo item4 = new TextNoteInfo(text2, PenColor.PC_Black, (double)text2.Length, xyz31, (double)text2.Length, (double)text2.Length * 1.5);
					stairs.m_listText.Add(item4);
				}
			}
			this.DrawTrigonStairRunCurves(ref stairs, bClockwiseUp, bDrawNoteInfo);
			this.DrawTrigonStairsLandCurves(ref stairs, bClockwiseUp, xyz19, xyz21, xyz23, xyz25, xyz27, xyz29);
			this.DrawTrigionStairBeamCurves(ref stairs, bClockwiseUp, xyz19, xyz21, xyz23, xyz25, xyz27, xyz29, bBottom, bMid, bLand, bTop);
			this.DrawTrigonStairsNoteInfo(ref stairs, xyz19);
			return true;
		}

		private string ReadFileFirstLine(string sPath)
		{
			FileStream fileStream = new FileStream(sPath, FileMode.Open);
			StreamReader streamReader = new StreamReader(fileStream);
			streamReader.BaseStream.Seek(0L, SeekOrigin.Begin);
			string result = streamReader.ReadLine();
			streamReader.Close();
			fileStream.Close();
			return result;
		}

		private List<CurveInfo> CreateTrigonlandOneCurve(List<XYZ> arPoints)
		{
			List<CurveInfo> list = new List<CurveInfo>();
			if (6 == arPoints.Count)
			{
				CurveInfo item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[0], arPoints[1], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
				item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[1], arPoints[2], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
				item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[2], arPoints[3], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
				item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[3], arPoints[4], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
				item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[4], arPoints[5], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
				item = base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, arPoints[5], arPoints[0], null);
				if (item.CurveObj != null)
				{
					list.Add(item);
				}
			}
			return list;
		}

		private void DrawTrigonStairsLandCurves(ref TrigonStairs param_stairs, bool bClockwiseUp, XYZ ptBL, XYZ ptBR, XYZ ptML, XYZ ptMR, XYZ ptTL, XYZ ptTR)
		{
			if (param_stairs != null && param_stairs.m_LandData.TheType == LandingType.LT_Trigon)
			{
				LineRunData bottomRunData = param_stairs.m_BottomRunData;
				LineRunData midRunData = param_stairs.m_MidRunData;
				LineRunData topRunData = param_stairs.m_TopRunData;
				List<XYZ> list = new List<XYZ>();
				list.Add(XYZ.Zero);
				list.Add(XYZ.Zero);
				list.Add(XYZ.Zero);
				list.Add(XYZ.Zero);
				list.Add(XYZ.Zero);
				list.Add(XYZ.Zero);
				list[0] = bottomRunData.PtRunTopLeft;
				list[1] = ptBL;
				list[2] = ptBR;
				list[3] = midRunData.PtRunBottomLeft;
				list[4] = midRunData.PtRunBottomRight;
				list[5] = bottomRunData.PtRunTopRight;
				double bottomElevation;
				if (bClockwiseUp)
				{
					bottomElevation = midRunData.BottomElevation;
				}
				else
				{
					bottomElevation = bottomRunData.BottomElevation;
				}
				List<CurveInfo> landCurves = this.CreateTrigonlandOneCurve(list);
				LandingCurveInfo item = new LandingCurveInfo(landCurves, bottomElevation);
				param_stairs.m_listLandCurve.Add(item);
				list[0] = midRunData.PtRunTopLeft;
				list[1] = ptML;
				list[2] = ptMR;
				list[3] = topRunData.PtRunBottomLeft;
				list[4] = topRunData.PtRunBottomRight;
				list[5] = midRunData.PtRunTopRight;
				if (bClockwiseUp)
				{
					bottomElevation = topRunData.BottomElevation;
				}
				else
				{
					bottomElevation = midRunData.BottomElevation;
				}
				landCurves = this.CreateTrigonlandOneCurve(list);
				LandingCurveInfo item2 = new LandingCurveInfo(landCurves, bottomElevation);
				param_stairs.m_listLandCurve.Add(item2);
				if (!bClockwiseUp)
				{
					LandingCurveInfo value = param_stairs.m_listLandCurve[0];
					param_stairs.m_listLandCurve[0] = param_stairs.m_listLandCurve[1];
					param_stairs.m_listLandCurve[1] = value;
				}
			}
		}

		private void DrawTrigonStairRunCurves(ref TrigonStairs param_stairs, bool bClockwiseUp, bool bDrawNoteInfo)
		{
			if (param_stairs != null)
			{
				LineRunData bottomRunData = param_stairs.m_BottomRunData;
				LineRunData midRunData = param_stairs.m_MidRunData;
				LineRunData topRunData = param_stairs.m_TopRunData;
				if (!bClockwiseUp)
				{
					SingleRunCurveInfo singleRunCurveInfo = new SingleRunCurveInfo();
					singleRunCurveInfo.BottomElevation = topRunData.BottomElevation;
					base.DrawLinearRun(topRunData, topRunData.PtRunTopRight, topRunData.PtRunTopLeft, topRunData.PtRunBottomLeft, topRunData.PtRunBottomRight, ref singleRunCurveInfo, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
					param_stairs.m_listRunCurve.Add(singleRunCurveInfo);
					singleRunCurveInfo = new SingleRunCurveInfo();
					singleRunCurveInfo.BottomElevation = midRunData.BottomElevation;
					base.DrawLinearRun(midRunData, midRunData.PtRunTopRight, midRunData.PtRunTopLeft, midRunData.PtRunBottomLeft, midRunData.PtRunBottomRight, ref singleRunCurveInfo, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
					param_stairs.m_listRunCurve.Add(singleRunCurveInfo);
					singleRunCurveInfo = new SingleRunCurveInfo();
					singleRunCurveInfo.BottomElevation = bottomRunData.BottomElevation;
					base.DrawLinearRun(bottomRunData, bottomRunData.PtRunTopRight, bottomRunData.PtRunTopLeft, bottomRunData.PtRunBottomLeft, bottomRunData.PtRunBottomRight, ref singleRunCurveInfo, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
					param_stairs.m_listRunCurve.Add(singleRunCurveInfo);
					return;
				}
				SingleRunCurveInfo singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = bottomRunData.BottomElevation;
				base.DrawLinearRun(bottomRunData, bottomRunData.PtRunBottomLeft, bottomRunData.PtRunBottomRight, bottomRunData.PtRunTopRight, bottomRunData.PtRunTopLeft, ref singleRunCurveInfo2, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
				param_stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = midRunData.BottomElevation;
				base.DrawLinearRun(midRunData, midRunData.PtRunBottomLeft, midRunData.PtRunBottomRight, midRunData.PtRunTopRight, midRunData.PtRunTopLeft, ref singleRunCurveInfo2, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
				param_stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = topRunData.BottomElevation;
				base.DrawLinearRun(topRunData, topRunData.PtRunBottomLeft, topRunData.PtRunBottomRight, topRunData.PtRunTopRight, topRunData.PtRunTopLeft, ref singleRunCurveInfo2, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
				param_stairs.m_listRunCurve.Add(singleRunCurveInfo2);
			}
		}

		private void DrawTrigionStairBeamCurves(ref TrigonStairs param_stairs, bool bClockwiseUp, XYZ ptBottomLandL, XYZ ptBottomLandR, XYZ ptMidLandL, XYZ ptMidLandR, XYZ ptToplandL, XYZ ptTopLandR, bool bBottom, bool bMid, bool bLand, bool bTop)
		{
			LineRunData bottomRunData = param_stairs.m_BottomRunData;
			LineRunData midRunData = param_stairs.m_MidRunData;
			LineRunData topRunData = param_stairs.m_TopRunData;
			BaseBeamData beamData = param_stairs.m_BeamData;
			double num = beamData.BeamWidth / 2.0;
			double angle = Math.PI*.5;
			XYZ xyz = ptBottomLandL - ptBottomLandR;
			xyz = Geometry.RotateTo(xyz, angle, XYZ.BasisZ);
			xyz = xyz.Normalize();
			xyz = xyz.Multiply(num);
			XYZ xyz2 = ptMidLandL - ptMidLandR;
			xyz2 = Geometry.RotateTo(xyz2, angle, XYZ.BasisZ);
			xyz2 = xyz2.Normalize();
			xyz2 = xyz2.Multiply(num);
			XYZ xyz3 = ptToplandL - ptTopLandR;
			xyz3 = Geometry.RotateTo(xyz3, angle, XYZ.BasisZ);
			xyz3 = xyz3.Normalize();
			xyz3 = xyz3.Multiply(num);
			XYZ xyz4 = bottomRunData.PtRunTopLeft - bottomRunData.PtRunBottomLeft;
			xyz4 = xyz4.Normalize();
			xyz4 = xyz4.Multiply(num);
			XYZ xyz5 = midRunData.PtRunTopLeft - midRunData.PtRunBottomLeft;
			xyz5 = xyz5.Normalize();
			xyz5 = xyz5.Multiply(num);
			XYZ xyz6 = topRunData.PtRunTopLeft - topRunData.PtRunBottomLeft;
			xyz6 = xyz6.Normalize();
			xyz6 = xyz6.Multiply(num);
			if (bClockwiseUp)
			{
				if (bBottom)
				{
					List<CurveInfo> list = new List<CurveInfo>();
					XYZ ptS = bottomRunData.PtRunBottomLeft - xyz4;
					XYZ ptE = bottomRunData.PtRunBottomRight - xyz4;
					list.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, xyz4));
					double bottomElevation = bottomRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo = new BeamCurveInfo(list, bottomElevation);
					beamCurveInfo.m_Type = BeamType.BT_Bottom;
					beamCurveInfo.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo);
				}
				if (bMid)
				{
					List<CurveInfo> list2 = new List<CurveInfo>();
					XYZ ptS2 = bottomRunData.PtRunTopLeft + xyz4;
					XYZ ptE2 = bottomRunData.PtRunTopRight + xyz4;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, xyz4.Normalize()));
					ptS2 = midRunData.PtRunBottomLeft - xyz5;
					ptE2 = midRunData.PtRunBottomRight - xyz5;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
					double bottomElevation2 = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo2 = new BeamCurveInfo(list2, bottomElevation2);
					beamCurveInfo2.m_Type = BeamType.BT_Mid;
					beamCurveInfo2.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo2);
					list2 = new List<CurveInfo>();
					ptS2 = midRunData.PtRunTopLeft + xyz5;
					ptE2 = midRunData.PtRunTopRight + xyz5;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, xyz5.Normalize()));
					ptS2 = topRunData.PtRunBottomLeft - xyz6;
					ptE2 = topRunData.PtRunBottomRight - xyz6;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
					bottomElevation2 = topRunData.BottomElevation;
					beamCurveInfo2 = new BeamCurveInfo(list2, bottomElevation2);
					beamCurveInfo2.m_Type = BeamType.BT_Mid;
					beamCurveInfo2.m_nFloorNum = 1;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo2);
				}
				if (bLand)
				{
					List<CurveInfo> list3 = new List<CurveInfo>();
					XYZ ptS3 = ptBottomLandL + xyz;
					XYZ ptE3 = ptBottomLandR + xyz;
					list3.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, null));
					double bottomElevation3 = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo3 = new BeamCurveInfo(list3, bottomElevation3);
					beamCurveInfo3.m_Type = BeamType.BT_Land;
					beamCurveInfo3.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo3);
					list3 = new List<CurveInfo>();
					ptS3 = ptMidLandL + xyz2;
					ptE3 = ptMidLandR + xyz2;
					list3.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, null));
					bottomElevation3 = topRunData.BottomElevation;
					beamCurveInfo3 = new BeamCurveInfo(list3, bottomElevation3);
					beamCurveInfo3.m_Type = BeamType.BT_Land;
					beamCurveInfo3.m_nFloorNum = 1;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo3);
				}
				if (bTop)
				{
					List<CurveInfo> list4 = new List<CurveInfo>();
					XYZ ptS4 = topRunData.PtRunTopLeft + xyz6;
					XYZ ptE4 = topRunData.PtRunTopRight + xyz6;
					list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS4, ptE4, xyz6));
					double bottomElevation4 = topRunData.BottomElevation + topRunData.RunHeight - topRunData.TreadHeight;
					BeamCurveInfo beamCurveInfo4 = new BeamCurveInfo(list4, bottomElevation4);
					beamCurveInfo4.m_Type = BeamType.BT_Top;
					beamCurveInfo4.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo4);
					return;
				}
			}
			else
			{
				if (bBottom)
				{
					List<CurveInfo> list5 = new List<CurveInfo>();
					XYZ ptS5 = topRunData.PtRunTopLeft + xyz6;
					XYZ ptE5 = topRunData.PtRunTopRight + xyz6;
					list5.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS5, ptE5, -xyz6));
					double bottomElevation5 = topRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo5 = new BeamCurveInfo(list5, bottomElevation5);
					beamCurveInfo5.m_Type = BeamType.BT_Bottom;
					beamCurveInfo5.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo5);
				}
				if (bMid)
				{
					List<CurveInfo> list6 = new List<CurveInfo>();
					XYZ ptS6 = topRunData.PtRunBottomLeft - xyz6;
					XYZ ptE6 = topRunData.PtRunBottomRight - xyz6;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS6, ptE6, -xyz6.Normalize()));
					ptS6 = midRunData.PtRunTopLeft + xyz5;
					ptE6 = midRunData.PtRunTopRight + xyz5;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS6, ptE6, null));
					double bottomElevation6 = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo6 = new BeamCurveInfo(list6, bottomElevation6);
					beamCurveInfo6.m_Type = BeamType.BT_Mid;
					beamCurveInfo6.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo6);
					list6 = new List<CurveInfo>();
					ptS6 = midRunData.PtRunBottomLeft - xyz5;
					ptE6 = midRunData.PtRunBottomRight - xyz5;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS6, ptE6, -xyz5.Normalize()));
					ptS6 = bottomRunData.PtRunTopLeft + xyz4;
					ptE6 = bottomRunData.PtRunTopRight + xyz4;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS6, ptE6, null));
					bottomElevation6 = bottomRunData.BottomElevation;
					beamCurveInfo6 = new BeamCurveInfo(list6, bottomElevation6);
					beamCurveInfo6.m_Type = BeamType.BT_Mid;
					beamCurveInfo6.m_nFloorNum = 1;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo6);
				}
				if (bLand)
				{
					List<CurveInfo> list7 = new List<CurveInfo>();
					XYZ ptS7 = ptMidLandL + xyz2;
					XYZ ptE7 = ptMidLandR + xyz2;
					list7.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS7, ptE7, null));
					double bottomElevation7 = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo7 = new BeamCurveInfo(list7, bottomElevation7);
					beamCurveInfo7.m_Type = BeamType.BT_Land;
					beamCurveInfo7.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo7);
					list7 = new List<CurveInfo>();
					ptS7 = ptBottomLandL + xyz;
					ptE7 = ptBottomLandR + xyz;
					list7.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS7, ptE7, null));
					bottomElevation7 = bottomRunData.BottomElevation;
					beamCurveInfo7 = new BeamCurveInfo(list7, bottomElevation7);
					beamCurveInfo7.m_Type = BeamType.BT_Land;
					beamCurveInfo7.m_nFloorNum = 1;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo7);
				}
				if (bTop)
				{
					List<CurveInfo> list8 = new List<CurveInfo>();
					XYZ ptS8 = bottomRunData.PtRunBottomLeft - xyz4;
					XYZ ptE8 = bottomRunData.PtRunBottomRight - xyz4;
					list8.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS8, ptE8, -xyz4));
					double bottomElevation8 = topRunData.BottomElevation + topRunData.RunHeight - topRunData.TreadHeight;
					BeamCurveInfo beamCurveInfo8 = new BeamCurveInfo(list8, bottomElevation8);
					beamCurveInfo8.m_Type = BeamType.BT_Top;
					beamCurveInfo8.m_nFloorNum = 0;
					param_stairs.m_listBeamCurve.Add(beamCurveInfo8);
				}
			}
		}

		private void DrawTrigonStairsNoteInfo(ref TrigonStairs param_stairs, XYZ ptBottomLandL)
		{
			LineRunData bottomRunData = param_stairs.m_BottomRunData;
			LineRunData midRunData = param_stairs.m_MidRunData;
			LineRunData topRunData = param_stairs.m_TopRunData;
			double width = param_stairs.m_LandData.Width;
			XYZ xyz = XYZ.BasisY * 1.0;
			XYZ xyz2 = XYZ.BasisX * 1.0;
			XYZ ptStart = bottomRunData.PtRunTopLeft - xyz2;
			XYZ ptEnd = ptBottomLandL - xyz2;
			base.DrawStairsNoteInfo(ref param_stairs.m_listOtherCurve, ref param_stairs.m_listText, ptStart, ptEnd, "平台宽度", 0.8, 2.0, 5.0, 3, null);
			ptStart = bottomRunData.PtRunTopLeft + xyz;
			ptEnd = bottomRunData.PtRunTopRight + xyz;
			base.DrawStairsNoteInfo(ref param_stairs.m_listOtherCurve, ref param_stairs.m_listText, ptStart, ptEnd, "梯段宽度", 0.8, 5.0, 2.0, 3, null);
			ptStart = bottomRunData.PtRunBottomLeft - xyz2;
			ptEnd = bottomRunData.PtRunBottomLeft + XYZ.BasisY * bottomRunData.TreadDepth - xyz2;
			base.DrawStairsNoteInfo(ref param_stairs.m_listOtherCurve, ref param_stairs.m_listText, ptStart, ptEnd, "踏步宽度", 0.8, 2.0, 5.0, 3, null);
			if (1E-09 < param_stairs.m_dWellWidth)
			{
				ptStart = bottomRunData.PtRunBottomRight + xyz2 + xyz;
				ptEnd = topRunData.PtRunTopRight + xyz2 + xyz;
				base.DrawStairsNoteInfo(ref param_stairs.m_listOtherCurve, ref param_stairs.m_listText, ptStart, ptEnd, "梯井内围", 0.8, 5.0, 2.0, 3, null);
			}
		}
	}
}
